class HtmlDocument:
    extension = 'html'
    version = '5'

    def render():
        print('Rendering')

# get class variables
print(HtmlDocument.extension)
print(getattr(HtmlDocument, 'media_type', 'text/html'))

# set class variables
HtmlDocument.version = 10
setattr(HtmlDocument, 'version', 10)

# add class variables
HtmlDocument.media_type = 'text/html'
setattr(HtmlDocument, 'media_type', 'text/html')

# delete class variables

delattr(HtmlDocument, 'version')
# del HtmlDocument.version 

from pprint import pprint

pprint(HtmlDocument.__dict__)